//路由层

const express = require('express')
const path = require('path')
const RoutesController = require(path.join(baseName, 'routesController'))
const router = express.Router()

router.get('/register', RoutesController.register)

//处理404
router.use((req, res) => {
    res.status(404).send('找不到资源！')
})

//处理500
router.use((err, req, res) => {
    if (err) {
        res.status(500).send('服务器出错！')
    }
})

module.exports = router